package com.test0103.test02;



public class Position {
    private int id;
    private String name;
    private double salary;
    private Employee[] employees = new Employee[2];
    private int index=0;


    public Position() {

    }

    public Position(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public Position(int id, String name, double salary) {
        this.id = id;
        this.name = name;
        this.salary = salary;
    }

    public Employee[] getEmployees() {
        return employees;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }



    @Override
    public String toString() {
        return
                "职位id:" + id +
                "\t职位名称" + name ;
    }
    public void addEmployee(Employee emp){
        employees[index++]=emp;
    }

}
